Repository navigation
feat: add --secrets-file to cf previews deploy - #537
Conversation
commit: |
|
LGTM |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 276.2 ms | 13.1 ms | 267.7 ms | 326.4 ms |
| base | 270.9 ms | 3.6 ms | 265.3 ms | 277.3 ms |
Δ (PR vs base): ↑ +5.4 ms (+2.0%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
220999d to
71773aa
Compare
|
LGTM! |
There was a problem hiding this comment.
✅ Approved — No issues found. The flag is wired through to previewBuildOutput, the metadata and tests match it, and the deploy-helpers 0.28.0 dependency is already in place.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
The new option is wired correctly into the builder and the previewBuildOutput() call. The description refactor gives cf deploy the same text as before.
📝 Documentation: ✅ LGTM
The help text, the metadata and the changeset match the new behaviour.
Reviewed commit: 71773aa6
Summary
Add
--secrets-filetocf previews deploy. It accepts the same JSON or.envfile format ascf deploy --secrets-file. Right now cf has no way to give a Preview its secrets: they have to be set in the dashboard or withwrangler preview secret put.The flag is passed to
previewBuildOutput(). That function parses the file the same waycf deploydoes and uploads each entry as a secret on the Preview deployment. The help text reuses thecf deploydescription, reworded for a Preview deployment. Typed metadata, the generated command catalogs, tests, and a minor changeset are included.Dependencies
Requires
@cloudflare/deploy-helpers0.28.0, which addssecretsFileto thepreviewBuildOutput()arguments (cloudflare/workers-sdk#16751). #708 brings it to main, so this PR doesn't change any dependencies.